package com.woniu.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.woniu.pojo.Address;
import com.woniu.pojo.China;
import com.woniu.vo.AddressRequest;
import com.woniu.vo.AddressVo;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface AddressService extends IService<Address> {
    /**
     * 通过 userId 查询当前用户地址列表
     * */
    List<AddressVo> findAddressByUserId(Long userId);

    /**
     * 查询所有省份
     * */
    List<China> getAllProvinces();

    List<China> getAllCities(Integer provinceId);

    void saveAddress(AddressRequest addressRequest, Long userId);
}
